package com.huan.study.sharding.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huan.study.sharding.entity.Customer;
import org.apache.ibatis.annotations.Select;

/**
 * @author huan.fu 2021/9/27 - 下午2:34
 */
public interface CustomerMapper2 extends BaseMapper<Customer> {


    @Select("select phone, sum(money) as money from customer  group by phone")
    Page<Customer> selectPage3(   Page page);

    @Select("select count(1)  from customer where id in (1,2,3,4,5,6,7,8) group by money")
    Long selectPage4();
}
